package com.doudou.collection.orm.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class CommentsDTO implements Serializable {

    /**
     * 评论id
     */
    private Long id;

    /**
     * 用户id
     */
    @NotNull
    private Long userId;
    /**
     * 评论地点
     */
    @NotNull
    @ApiModelProperty(value = "评论地点", required = true)
    private String city;
    /**
     * 评论内容
     */
    @NotNull
    @ApiModelProperty(value = "评论内容", required = true)
    private String content;
    /**
     * 关联的一级评论id,若是一级评论默认未0
     */
    private Long parentId;
    /**
     * 评论回复的id
     */
    private Long answerId;
    /**
     * 评论点赞数量
     */
    private Integer liked;
    /**
     * 评论数量
     */
    private Integer comments;
    /**
     * 评论状态码,0正常,1被举报,2禁止查看
     */
    private Integer status;
    /**
     * 评论的文章id
     */
    @NotNull
    @Range(min = 1, message = "请提交正确的文章id值")
    @ApiModelProperty(value = "评论文章id", required = true)
    private Long blogId;


}
